define([
    'angular-animate',
    'angular-ui-bootstrap',
    'ng-prettyjson',
    'ng-prettyjson-tmpl',
    'js/directives/apidocs'
], function() {
    var directive = angular.module('app.directive', ['ngPrettyJson', 'ngAnimate', 'ui.bootstrap',
        'app.directive.apidocs']);

    directive.config(['$uibTooltipProvider', function($uibTooltipProvider) {
        $uibTooltipProvider.options({
            animation: false,
            appendToBody: false,
            placement: 'auto',
            popupCloseDelay: 0,
            popupDelay: 0,
        });
    }]);

    directive.directive('autofocus', function() {
        return {
            restrict: 'A',
            link: function(scope, element) {
                element[0].focus();
            }
        };
    });

    return directive;
});
